package indi.juzhuohan.chatroom.client;
/**
 * 抖动类
 * @author 鞠卓瀚
 *
 */
public class Jitter extends Thread {
	
	Chatframe frame;
	
	public Jitter(Chatframe frame) {
		this.frame = frame;
	}
	
	@Override
	public void run() {
		try {
			for (int i = 0; i < 3; i++) {
				frame.setLocation(frame.getX()-10, frame.getY());
				Thread.sleep(88);
				frame.setLocation(frame.getX(), frame.getY()-10);
				Thread.sleep(88);
				frame.setLocation(frame.getX()+10, frame.getY());
				Thread.sleep(88);
				frame.setLocation(frame.getX(), frame.getY()+10);
				Thread.sleep(88);
			}
		} catch (InterruptedException e1) {
			System.out.println("jitter");
		}
	}
}
